The present invention generally relates to a data processing apparatus, and more particularly, to a microprogram control type data processing apparatus.
There is known a microprogram control in which microinstructions or micro-orders are stored in a memory and a series of microinstructions necessary to execute an instruction is sequentially read out. A microinstruction is obtained by dividing a procedure of a structural element, such as a storage unit or an operation unit, with respect to one instruction (macro operation) executed by a processor or computer (a machine language instruction or microinstruction) into basic procedures (micro operation). According to a microprogram control, it is possible to design a logic part of the data processing apparatus even when the details of the specification of an architecture are not yet determined and thus reduce the time it takes to design the data processing apparatus. Information about a series of microinstructions which are to be executed is stored in the form of a firmware. Thus, it is possible to flexibly carry out a modification and/or addition of processing. For the above-mentioned reasons, a microprogram control is being widely used.
A conventional microprogram control has an advanced instruction which defines a series of procedures which are to be executed in response to one instruction. Typical examples of such an advanced instruction are a string move instruction and a string search instruction. The string move instruction is used when a data string stored in a memory area is transferred to another memory area. The string search instruction is used when data in a memory is searched to identify a desired data string.
It will be noted that it takes a long time to execute an advanced instruction. This prevents real-time data processing. From this point of view, if an interrupt or an exception processing request occurs while an advanced instruction is being executed, the execution of the advanced instruction is temporarily stopped and the interrupt or exception processing request is executed. In order to temporarily stop the execution of the advanced instruction such as the string move instruction or string search instruction, it is necessary to save parameter information in memory areas or registers until the stopped execution is started again. For example, it is necessary to save a memory address of a transfer source (source memory address), a memory address of a transfer destination (destination memory address), and the number of times that data is transferred, when the execution of the string move instruction is temporarily stopped.
Conventionally, parameter information is renewed when one processing unit is completed without having errors. For example, in a conventional string move instruction, when one processing unit is completed without having an error, that is, when data is read out from a memory area and then written into another memory area without having an error, parameter information about the source memory address, the destination memory address and the number of times that data is transferred is renewed. With this arrangement, if an error occurs while data is being read out, parameter information itself obtained at this time is saved.
However, conventional microprogram controls such as the above-mentioned microprogram control present the following disadvantages. Parameter information is not renewed until one processing unit is completed. This is not suitable for a pipeline process in which a memory is being accessed while an address is calculated to obtain the next memory access procedure. In addition, it takes a considerably long time to save parameter information in corresponding registers if it is necessary to use a large amount of parameter information. As a result, it takes a long time to accept and start an interrupt or exception processing request.
One may consider the use of backup registers for use in backup of parameter information and/or temporary registers for storing parameter information which is being renewed. In this case, the contents of the temporary registers are transferred to the backup registers at once. However, this requires a large amount of hardware.